package xiao.ze.demo.service.impl;

import org.springframework.stereotype.Service;
import xiao.ze.demo.entity.Course;
import xiao.ze.demo.entity.SelCourseTerm;
import xiao.ze.demo.mapper.CourseMapper;
import xiao.ze.demo.service.CourseService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description: TODO
 * @author: Tokyo_God
 * @date: 2021/2/17 12:07
 * Role of:
 * @version: v1.0
 */
@Service
public class CourseServiceImpl implements CourseService {
    @Resource
    private CourseMapper courseMapper;

    @Override
    public int addCourse(Course course) {
        return courseMapper.addCourse(course);
    }

    @Override
    public List<Course> selAllCourse() {
        return courseMapper.selAllCourse();
    }

    @Override
    public Course selCourseNo(String no) {
        return courseMapper.selCourseNo(no);
    }

    @Override
    public List<Course> selCourse(SelCourseTerm courseTerm) {
        System.out.println(courseTerm.toString());
        return courseMapper.selCourse(courseTerm);
    }

    @Override
    public int delCourse(String no) {
        return courseMapper.delCourse(no);
    }

    @Override
    public int upCourse(Course course) {
        return courseMapper.upCourse(course);
    }
}
